package com.jc.auth.common.enums;

import lombok.Getter;

/**
 * @Description: 用户状态枚举
 * @Author: ASL_ly
 * @Package: com.jc.subject.common.enums
 * @Project: jc-club
 * @Date: 2024/10/22  21:04
 */
@Getter
public enum AuthUserStatusEnum {
    OPEN(0, "启用"),
    CLOSE(1, "禁用");

    public Integer code;
    public String desc;

    AuthUserStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthUserStatusEnum getByCode(Integer codeVal){
        for(AuthUserStatusEnum resultCodeEnum : AuthUserStatusEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }
}
